from soaplib.wsgi_soap import SimpleWSGISoapApp
from soaplib.service import soapmethod

from soap_types import *

class PyBooklerService(SimpleWSGISoapApp):
    
    @soapmethod(Integer, Integer, _returns=Array(Stats))
    def get_stats(self, idgenre, idauthor):
        pass
    
    @soapmethod(String, String, _returns=UserSoap)
    def user_login(self, user, passwd):
        pass
    
    @soapmethod(_returns=Array(UserSoap))
    def get_users(self):
        pass
    
    @soapmethod(Integer, _returns=Array(AuthorSoap))
    def get_authors(self, id):
        pass
    
    @soapmethod(Integer, _returns=Array(AddressSoap))
    def get_addresses(self, id):
        pass
    
    @soapmethod(_returns=Array(BookSoap))
    def get_books(self):
        pass
    
    @soapmethod(Integer, _returns=Array(BookshopSoap))
    def get_bookshops(self, id):
        pass
    
    @soapmethod(_returns=Array(ProductSoap))
    def get_products(self):
        pass
    
    @soapmethod(Integer, _returns=Array(OrderSoap))
    def get_orders(self, id):
        pass
    
    @soapmethod(_returns=Array(GenreSoap))
    def get_genres(self):
        pass
    
    @soapmethod(_returns=Array(EditionSoap))
    def get_editions(self):
        pass
    
    @soapmethod(Integer, _returns=Array(PrintSoap))
    def get_prints(self, id):
        pass
    
    # save service
    @soapmethod(AuthorSoap, _returns=Integer)
    def save_author(self, author):
        pass
    
    @soapmethod(AddressSoap, _returns=Integer)
    def save_address(self, address):
        pass
    
    @soapmethod(BookSoap, _returns=Integer)
    def save_book(self, book):
        pass
    
    @soapmethod(BookshopSoap, _returns=Integer)
    def save_bookshop(self, bookshop):
        pass
    
    @soapmethod(ProductSoap, _returns=Integer)
    def save_product(self, product):
        pass
    
    @soapmethod(UserSoap, _returns=Integer)
    def save_user(self, user):
        pass

    @soapmethod(OrderSoap, _returns=Integer)
    def save_order(self, order):
        pass
    
    @soapmethod(GenreSoap, _returns=Integer)
    def save_genre(self, genre):
        pass
    
    @soapmethod(EditionSoap, _returns=Integer)
    def save_edition(self, edition):
        pass
    
    @soapmethod(PrintSoap, _returns=Integer)
    def save_print(self, pr):
        pass
    
    @soapmethod(Integer)
    def confirm_print(self, id):
        pass
    
    # delete services
    @soapmethod(AuthorSoap)
    def delete_author(self, author):
        pass

    @soapmethod(BookSoap)
    def delete_book(self, book):
        pass
    
    @soapmethod(BookshopSoap)
    def delete_bookshop(self, bookshop):
        pass
    
    @soapmethod(ProductSoap)
    def delete_product(self, product):
        pass
    
    @soapmethod(OrderSoap)
    def delete_order(self, order):
        pass
    
    @soapmethod(UserSoap)
    def delete_user(self, user):
        pass

    @soapmethod(Integer)
    def delete_print(self, id):
        pass
    